

<?PHP


$filename = "businesses.txt";
$fileToOpen = fopen($filename,"r");
$content = fread($fileToOpen, filesize($filename));
$content = nl2br($content); // \n to <br>
fclose($fileToOpen);


$_POST['textareaname']="line1
line2
line3";



$text = trim($_POST['textareaname']);
//$text = trim($content);
$textAr = explode("\n", $text);
//$textAr = array_filter($text, 'trim'); // remove any extra \r characters left behind

print_r($textAr);

/*foreach ($textAr as $line) {
    // processing here. 
} */


?>
